Terahertz spectroscopy and imaging in dynamic environments with spectral response enhancements

ABSTRACT

Embodiments are disclosed for terahertz spectroscopy and imaging in dynamic environments. In an embodiment, a method comprises emitting a continuous electromagnetic (EM) wave in a terahertz (THz) frequency band into a dynamic environment. The EM THz wave is reflected off an object in the environment. A spectral response of a received signal indicative of the reflected EM wave is determined that includes absorption spectra at a frequency in the THz frequency band. The absorption spectra is indicative of a transmission medium in the environment. The spectral response of the received signal is compensated for fixed and frequency-specific losses. The compensated absorption spectra is compared with known absorption spectra of target transmission mediums. Based on results of the comparing, a particular target transmission medium is identified as being the transmission medium in the environment. The absorption spectra loss is used to determine a concentration level of the target transmission medium.

TECHNICAL FIELD

This disclosure relates generally to terahertz (THz) spectroscopy andimaging.

BACKGROUND

Today's sensor technologies (e.g., metal-oxide (MOX) gas sensors,electrochemical gas sensors) can detect a few gases but have severaldisadvantages. For example, integrating a gas sensor on an electronicdevice requires an aperture or opening to allow air to flow onto the gassensor so that the gas can be detected. The design of an aperture into aconsumer electronic device poses several challenges. The aperture maydegrade water resistivity of the device. Also, the size of the aperturemay be constrained due to a tradeoff between form factor and gasdetection capability. In addition to aperture constraints, the number ofgases detected by a given sensor is limited and one sensor cannot detectgas, liquid and solid materials. Integrating multiple sensors on theconsumer electronic device to detect gas, liquid and solid materialswould increase the size and cost of the consumer electronic device.Also, many of today's gas sensors have a high idle-time currentconsumption to maintain the properties of the sensor. For example, MOXgas sensors have heating elements that are used to maintain a certaintemperature of the sensor at all times. Also, the accuracy of today'sgas sensors drift over time requiring periodic calibration.

In addition to detecting the presence of gas, health/quality of liquidor solid materials in an environment, there is need for imagingapplications on consumer electronic devices related to healthmonitoring, such as detecting skin cancer and other skin disorders. Theconventional image sensors (e.g., CMOS image sensors) found on consumerelectronic devices, however, are incapable of performing such healthmonitoring applications.

SUMMARY

Embodiments are disclosed for THz spectroscopy and imaging in dynamicenvironments with spectral response enhancements.

In an embodiment, a method comprises emitting, by a transmitter of anelectronic device, a continuous electromagnetic (EM) wave in a terahertz(THz) frequency band. The EM wave is emitted into a dynamic environmentthat includes a transmission medium that changes over time. A reflectedEM wave is reflected off at least one object in the environment andreceived by a receiver of the electronic device. One or more processorsof the electronic device determine a spectral response of a receivedsignal indicative of the reflected EM wave. The spectral responseincludes absorption spectra at a frequency in the THz frequency bandthat is indicative of the transmission medium in the environment. Theone or more processors compensate the spectral response of the receivedsignal for fixed and frequency-specific losses. The one or moreprocessors compare the compensated absorption spectra with knownabsorption spectra of target transmission mediums. The one or moreprocessors identify, based on results of the comparing, a particulartarget transmission medium as being the transmission medium in theenvironment. The one or more processors determine an absorption lossfrom the compensated absorption spectra in the spectral response of thereceived signal, and use the absorption loss to obtain a concentrationlevel of the target transmission medium in the environment.

In an embodiment, a system comprises: a transmitter configured to emit acontinuous electromagnetic (EM) wave in a terahertz (THz) frequency bandinto a dynamic environment, the dynamic environment including atransmission medium that changes over time; a receiver configured toreceive a reflected EM wave from at least one object in the environment;one or more processors; memory storing instructions that when executedby the one or more processors, cause the one or more processors toperform operations comprising: determining a spectral response of areceived signal indicative of the reflected EM wave, the spectralresponse including absorption spectra at a frequency in the THzfrequency band that is indicative of the transmission medium in theenvironment; compensating the spectral response of the received signalfor fixed and frequency-specific losses; comparing the absorptionspectra with known absorption spectra of target transmission mediums;identifying a particular target transmission medium as being thetransmission medium in the environment based on results of thecomparing; determining an absorption loss from the absorption spectra inthe spectral response of the received signal; and using the absorptionloss to obtain a concentration level of the target transmission mediumin the environment.

In an embodiment, a non-transitory, computer-readable storage medium hasstored thereon instructions that when executed by one or moreprocessors, cause the one or more processors to perform operations,comprising: emitting an continuous electromagnetic (EM) wave in aterahertz (THz) frequency band, the EM wave being emitted into a dynamicenvironment that includes a transmission medium that changes over time;receiving a reflected EM wave reflected off at least one object in theenvironment; determining a spectral response of a received signalindicative of the reflected EM wave, the spectral response includingabsorption spectra at a frequency in the THz frequency band that isindicative of the transmission medium in the environment; compensatingthe spectral response of the received signal for fixed andfrequency-specific losses; comparing the absorption spectra with knownabsorption spectra of target transmission mediums; identifying, based onresults of the comparing, a particular target transmission medium asbeing the transmission medium in the environment; determining anabsorption loss from the absorption spectra in the spectral response ofthe received signal; and using the absorption loss to obtain theconcentration level of the target transmission medium in theenvironment.

One or more of the disclosed embodiments provide one or more of thefollowing advantages. The disclosed THz spectroscopy and imaging systemsand methods for estimating concentration levels of chemicals or thequality of a transmission medium (e.g., gas, liquid, solid or plasmamaterials) in a dynamic environment using an electronic device (e.g., asmart phone, tablet computer, wearable computer). With THz spectroscopyand imaging: 1) there is no need for an aperture on the consumerelectronic device; 2) gas, liquid and solid materials can be detected;3) there is very low idle-time current consumption because there are nomaterial properties of a sensor to support; 4) there is no drift overtime because a pure electromagnetic wave is used for detection; and 5)imaging applications for health monitoring (e.g., detecting skin cancer)can be realized on consumer electronic devices.

The details of one or more implementations of the subject matter are setforth in the accompanying drawings and the description below. Otherfeatures, aspects and advantages of the subject matter will becomeapparent from the description, the drawings and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a conceptual block diagram of a THz spectroscopy system forestimating the concentration levels of chemicals or quality of atransmission medium or ambience in a dynamic environment, according toan embodiment.

FIG. 1B illustrates an example spectral response of a received signal,according to an embodiment.

FIG. 2A is a conceptual block diagram of a THz imaging system, accordingto an embodiment.

FIG. 2B illustrates received signal waveforms resulting from a sweepingtransmitted signal around an object dimension, according to anembodiment.

FIG. 3 is a table describing environment and system losses, theircontributing factors and their effects on the spectral response of thereceived signal, according to an embodiment.

FIG. 4 illustrates the spectral response of a received signal, includingabsorption loss that varies as a function of frequency and transmissionmedium, according to an embodiment.

FIG. 5A illustrates a hypothetical spectral response of Oxygen (02),Nitrogen (N) or other known atmospheric gas concentration, according toan embodiment.

FIG. 5B illustrates a spectral response of a received signal with thehypothetical spectral response of Oxygen (02), Nitrogen (N) or otherknown atmospheric gas concentration shown in FIG. 5A, according to anembodiment.

FIG. 5C illustrates a spectral response of the received signalcompensated for frequency-specific loss using the hypothetical spectralresponse of Oxygen (02), Nitrogen (N) or other known atmospheric gasconcentration shown in FIG. 5A, according to an embodiment.

FIGS. 6A and 6B illustrate spectral responses of a received signalbefore and after compensation for fixed and additionalfrequency-specific impairments, according to an embodiment.

FIGS. 7A and 7B illustrate spectral responses of a received signalbefore and after compensation to restore the absorption signature peakbelow a noise floor of the baseband receiver, according to anembodiment.

FIG. 8 is a plot of a simulated absorption signature where the peak ofthe signature is restored using curve fitting, according to anembodiment.

FIG. 9 is a block diagram illustrating transmitted and received signalswith multiple polarizations, according to an embodiment.

FIG. 10 is a schematic diagram of a single receiver antenna circuit forin-plane transmission/reception of transmitted and received THz signals,according to an embodiment.

FIG. 11 is a schematic diagram of a dual receiver antenna and powercombining circuit for transmission/reception THz signals using multiplepolarizations, according to an embodiment.

FIG. 12 is a plot illustrating the increased power transfer gain for a45° reflection angle using the dual receiver antenna and power combiningcircuit of FIG. 11, according to an embodiment.

FIG. 13 is a block diagram illustrating an increase in path length of areceived THz signal due to multiple reflection surfaces in the dynamicenvironment, according to an embodiment.

FIG. 14 is a plot of a spectral response of the received signal due tothe change in the path length shown in FIG. 13, according to anembodiment.

FIG. 15 is a block diagram illustrating the creation and use of areference library of spectral responses for mapping measured absorptionloss and path length to a gas concentration level, according to anembodiment.

FIG. 16 is an example table of the reference library, according to anembodiment.

FIG. 17 is a schematic diagram of a mobile device system architecturefor performing THz spectroscopy and imaging in a dynamic environment,according to an embodiment.

FIG. 18 is a flow diagram of THz spectroscopy process in a dynamicenvironment, according to an embodiment.

FIGS. 19A and 19B is a flow diagram of a process of removing impairmentsfrom a spectral response of a received signal due to environmental andsystem losses.

FIGS. 20A and 20B are plots illustrating battery consumption versus dutycycle for an electronic device that performs THz scans, according to anembodiment.

FIG. 20C is a plot illustrating the impact of environmental factors on achemical signature, according to an embodiment.

FIGS. 21A and 21B illustrate the use of motions sensors of an electronicdevice to improve battery performance when the device is stationary andface up and when the device is stationary and face down, according to anembodiment.

FIGS. 22A and 22B illustrate adjusting THz scan duty cycle to savepower, according to an embodiment.

FIGS. 23A and 23B illustrates transmission power loss as a function ofincident angle, according to an embodiment.

FIGS. 24A and 24B illustrate sweeping a THz EM wave to build areflective signal strength table, according to an embodiment.

FIG. 25 is a flow diagram illustrating an adaptive beam scan todetermine an optimum sweep angle to improve battery performance,according to an embodiment.

FIGS. 26A and 26B illustrate adaptive transmit power output control toimprove battery performance, according to an embodiment.

FIG. 27 is plot of transmit signal power versus number of antennaelements, according to an embodiment.

FIG. 28A illustrates a “sniff mode” where THz EM waves are transmittedat discrete known frequencies of defined target chemicals that haveunique and maximum absorption spectra to improve battery performance,according to an embodiment.

FIG. 28B is schematic diagram of a bias-controlled varactor circuit fortransmitting discrete THz EM waves, according to an embodiment.

FIGS. 29A and 29B illustrate using ambient sensors to enablecompensation of spectral responses impaired by environmental factors,according to an embodiment.

FIG. 30 is a flow diagram illustrating using location-based informationto optimize THz spectroscopy and imaging, according to an embodiment.

FIG. 31 illustrates an example electronic device architectureimplementing the features and operations described in reference to FIGS.1-30, according to an embodiment.

DETAILED DESCRIPTION

A molecule can absorb and re-emit an electromagnetic (EM) wave atcertain frequencies, specific to the energy transitions of eitherelectronic, vibrational, or rotational modes. Each molecular speciesabsorbs the EM wave in a unique spectral pattern. In the gas phase, forexample, the rotational transition modes occur in polar molecules thatspan from the microwave to infrared (IR) spectra. The rotationaltransitions result in an absorption spectrum that contains Lorentzianresonances at discrete frequencies. The absorption spectrum is unique tothe molecule. This uniqueness enables the classification and recognitionof polar gases via THz spectroscopy.

Disclosed is a THz spectroscopy and imaging system and method whereby EMwaves are emitted in a dynamic environment in real-time by a transmitterof an electronic device in the THz frequency band. The EM waves arereflected by objects (e.g., walls) in the dynamic environment andreceived by a receiver of the electronic device in real-time. If atransmission medium (e.g., gas, liquid, solid, plasma) with anabsorption frequency in the THz frequency band is present between thetransmitter and the reflective object, the received signal level at thatfrequency will be lower than those at other frequencies. Thus,transmission mediums in the dynamic environment can be detected byilluminating one or more reflective objects in the dynamic environmentwith a range of THz frequencies covering the absorption spectra of thetransmission mediums to be detected and observing the reflectedspectrums.

In an embodiment, measured absorption spectra are compared to knownabsorption spectra of target transmission mediums by computing adistance metric (e.g., Euclidian distance) between the measured andknown absorption spectra. The target transmission medium having anabsorption spectra that is a minimum distance from the measuredabsorption spectra based on the distance metric is an identifiedtransmission medium in the dynamic environment. After identifying thetarget transmission medium, a reference library is used to estimate theconcentration level of the target transmission medium in the dynamicenvironment based on the measured absorption level and a computed totalpath length of the received signal in the dynamic environment. In adynamic environment, the total path length of the reflected THz signalchanges due to scattering and multiple reflections off objects withdifferent angles of incidence. The concentration level in parts permillion (PPM) will differ due to different path lengths. In anembodiment, the total path length of a THz signal is determined usingtime of arrival (TOA) calculations.

Embodiments are also disclosed for compensating the spectral response ofthe received signal to remove fixed and frequency-specific losses in thespectral response due to the environment and THz spectroscopy systemlimitations. Compensation for these losses include using a knownreference absorption spectra for a common transmission medium (e.g., O₂,N, H₂), and subtracting a delta between the measured and knownabsorption spectra. A fixed loss due to frequency range error isestimated by determining a frequency in the THz frequency band withminimum loss, and extrapolating the signal strength at that frequencyacross the entire THz spectrum. The fixed loss is the difference betweenthe transmitted signal strength and the extrapolated signal strength.After the fixed loss is determined, the fixed loss is subtracted fromthe spectral response of the received signal.

Multipath reflections off objects with different reflection angles canimpair the signal-to-noise ratio (SNR) of the received signal. In anembodiment, a hardware architecture includes a dual receiver antennacircuit and power combiner to improve the SNR of the received signalusing multiple polarizations for the transmitted and received THzsignals.

In an embodiment, motion sensors (e.g., accelerometers, gyros) are usedto adjust the duty cycle of THz wave scanning to improve batteryperformance, and ambient sensors (e.g., pressure sensor, temperaturesensor, humidity sensor) are used to reduce the impact of environmentalfactors (e.g., change in humidity or atmospheric pressure) on detectionaccuracy. Additionally, localization techniques (e.g., cellular,satellite-based, WiFi) can be used to account for different countryregulations/standards regarding safe or legal concentration levels ofchemicals or quality of a transmission medium. In an embodiment, the THzsystem uses a “sniff” mode of operation that causes THz waves to beemitted at discrete frequencies of known target gases using abias-controlled varactor circuit.

Example THz Spectroscopy System

FIG. 1A is a conceptual block diagram of a THz spectroscopy system 100for estimating the concentration levels of chemicals or quality of atransmission medium or ambience in a dynamic environment, according toan embodiment. System 100 enables consumer electronic devices (e.g.,smartphones, tablet computers, wearable devices) to perform spectroscopyapplications using EM waves in the THz frequency band.

The term “dynamic environment” as used in the specification is anenvironment where the transmission medium for the THz EM wavescontinuously changes in concentration level, and/or the location and/ororientation of the electronic device transmitting/receiving the THz EMwaves is changing, and/or the location and/or orientation of one or moreobjects reflecting the THz waves in the environment are moving. Anexample of a dynamic environment is an indoor location (e.g., a room ina house or office in a building) where concentration levels of dangerousgases (e.g., CO, CO₂) are continuously changing.

The term “transmission medium” as used in the specification and claimsis any material substance (e.g., solid, liquid, gas or plasma) that canpropagate THz EM waves. The term “baseband transceiver” as used in thespecification and claims is intended to include any chip, chip set orsystem on chip (SoC) that transmits and receives baseband signals in theTHz frequency band of about 0.3 THz to about 18 THz.

System 100 includes signal processor 101, baseband transmitter 102,baseband receiver 107 and reflective object 105 (e.g., a wall, ceiling,floor). Signal processor 101 commands baseband THz transmitter 102 toemit into dynamic environment 104 a continuous wave (CW) tone across theTHz frequency band (hereinafter, referred to as “transmitted signal 103(Tx)”). In an embodiment, transmitted signal 103 can be a pulsedwaveform. Transmitted signal 103 reflects off object 105 and thereflected energy is received by THz baseband receiver 107 (hereinafter,referred to as “received signal 106”).

In an embodiment, baseband transmitter 102 and baseband receiver 107 areimplemented as separate integrated circuit (IC) chips or are combinedinto a single IC chip referred to as a THz transceiver. In analternative embodiment, baseband receiver 107 is implemented in singlereceiver or dual receiver configuration for multiple polarizations, asdescribed in reference to FIG. 11. In an embodiment, signal processor101, baseband transmitter 102 and baseband receiver 107 are includedtogether in a single housing of an electronic device, such as asmartphone, tablet computer or wearable device (e.g., a smartwatch), asdescribed in reference to FIG. 17.

FIG. 1B illustrates spectral response 108 of received signal 106computed by signal processor 101. The vertical axis of the plot isreceived signal strength (dBm) and the horizontal axis of the plot isfrequency (THz). As can be observed from FIG. 1B, spectral response 108includes a unique absorption signature 109 at a specific frequency inthe THz frequency band. Signal processor 101 compares absorptionsignature 109 to known absorption signatures for various targettransmission mediums. If absorption signature 109 matches a knownabsorption signature for a target transmission medium, the targettransmission medium is identified as being present in dynamicenvironment 104. The concentration level for the identified transmissionmedium is then estimated using a reference library of knownconcentration levels for the target transmission medium based on themeasured absorption loss and path length of the received signal. In anembodiment, the reference library can be implemented as a table, asdescribed in reference to FIG. 16.

FIG. 2A is a block diagram illustrating a THz imaging system 200,according to an embodiment. System 200 includes signal processor 201,baseband transmitter 202, baseband receiver 207 and reflective object205. System 200 enables consumer electronic devices to perform imagingapplications using THz EM waves.

In the example shown, signal processor 201 commands baseband THztransmitter 202 to emit into dynamic environment 204 a continuous wave(CW) tone across the THz frequency band (hereinafter, referred to as“transmitted signal 203 (Tx)”). In an embodiment, transmitted signal 203can be a pulsed waveform. Transmitted signal 203 reflects off object 205in environment 204 and the reflected energy is received by THz receiver207 (hereinafter, referred to as “received signal 206”). In anembodiment, baseband transmitter 202 sweeps transmitted signal 203around a dimension L of object 205.

Object 205 can have any number of layers. An example multilayer object205 is human skin. In the example shown, object 205 has two layers 208a, 208 b. Baseband receiver 207 obtains received signals 206 a, 206 b atdifferent time instances. Signal processor 201 estimates the TOA of eachof received signals 206 a, 206 b, by computing the difference between astart time of transmission of transmitted signal 203 and start times forreceipt of received signals 206 a, 206 b. FIG. 2B illustrates receivedsignal strength waveforms 206 a, 206 b as a function of depth (mm) sweptover dimension L of reflective object 205. The determination of thedepth D between layers 208 a, 208 b of reflective object 205 isdetermined based on the TOA calculations.

FIG. 3 is a table 300 describing environment and system losses, theircontributing factors and their effects on the spectral response of areceived signal, according to an embodiment. As described above inreference to FIGS. 1A, 1B, THz spectroscopy attempts to match anabsorption signature at particular frequency in the THz frequency bandwith a known target absorption signature of a target transmissionmedium. In a dynamic environment (e.g., where gas concentration levelscontinuously change), the received signals are impaired due toenvironment and system losses, as described in the table of FIG. 3. Thelosses vary as a function of frequency and transmission medium.Accordingly, to operate effectively in a dynamic environment, there is aneed to estimate and compensate for environmental and system losses.

For environmental losses, contributing factors include but are notlimited to: the distance between the sensor and the reflective object,atmospheric absorption loss, angle of incidence at the reflective objectand the nature of the reflective object (e.g., the refractive index).The effect of the environment loss on THz spectroscopy system 100 is alowering of the SNR at the receiver. For example, reflective energy is afunction of distance. As distance increases, received signal strengthdecreases. Additionally, THz EM waves are absorbed in the atmosphere asthey propagate. The longer the path length, the more absorption loss.Depending on a certain angle at which the transmitted signal hits thereflective object (i.e., the angle of incidence), the received signalstrength may degrade as compared to other angles of incidence. Finally,some common materials like plywood, pine wood and brick, have lowerrefractive indexes which leads to higher reflective loss. For systemerrors, the contributing factors include but are not limited to lossesdue to frequency band. The primary effect on the THZ spectroscopy system100 due to system losses is an inaccurate concentration level estimationat high frequencies.

FIG. 4 illustrates an example spectral response 400 of a receivedsignal, including losses that vary as a function of frequency andtransmission medium, according to an embodiment. Transmitted signal 401is shown having a constant transmission energy. Received signal 402 isshown as having absorption signature 403 at a particular frequency inthe THz frequency band. Also, shown is the fixed loss 404 and additionalfrequency-specific loss 405 in received signal strength due toenvironmental and system losses, respectively. Techniques for estimatingand compensating for environmental and system losses are described inreference to FIGS. 5A-5C.

FIG. 5A illustrates a hypothetical spectral response 500 of Oxygen (O₂),Nitrogen (N) or other known atmospheric gas concentration, according toan embodiment. In an embodiment, the known spectral response of atransmission medium such as O₂ is used to remove the impairments in thespectral response of a received signal due to the environment. Otherknown hypothetical spectral responses can also be used, such as thespectral response for Nitrogen (N) or hydrogen (H₂). FIG. 5B illustratesspectral response 501 of a received signal with spectral response 500 ofO₂ shown in FIG. 5A. FIG. 5C illustrates spectral response 502 of thereceived signal compensated for environmental loss using spectralresponse 500, according to an embodiment. The frequency-specific lossdue to the environment is compensated by subtracting spectral response500 of O₂ from the spectral response of the received signal.

FIGS. 6A and 6B illustrate spectral responses 600, 602 of a receivedsignal before and after compensation for fixed and additionalfrequency-specific losses, according to an embodiment. In thistechnique, reference frequency 601 is selected in the THz frequency bandat which environment loss is minimal across the THz frequency band. Thesignal strength at reference frequency 601 is extrapolated across theentire THz frequency band. The difference between the signal strength ofthe transmitted signal 603 and the extrapolated received signal strengthassociated with reference frequency 601 is the fixed loss of the systemto be compensated. The additional frequency-specific loss shown in FIG.6A is determined based on the trend line of the received signalstrengths of other peaks (e.g., average of peaks) in the spectralresponse of the received signal at other frequencies. Any peak that issmall or negligible is ignored.

The spectral response of the received signal is compensated bysubtracting the signal strengths associated with the fixed loss andadditional frequency-specific loss from the spectral response of thereceived signal, as shown in FIG. 6B.

FIGS. 7A and 7B illustrate compensated and uncompensated spectralresponses 700, 702 of a received signal for restoring a portion of theabsorption signature peak below a noise floor of the baseband receiver,according to an embodiment. THz spectroscopy requires that the spectralresponse of the received signal be matched with a known spectralresponse of a target transmission medium. In some cases, the spectralresponse 700 of the received signal is impaired by environment/systemlosses that vary as a function of frequency and transmission medium.When the losses are high, the absorption signature peak can fall belownoise floor 701 of the baseband receiver, as shown in FIG. 7A, whichmeans its shape and size is unknown. FIG. 7B illustrates a compensatedspectral response 702 having a truncated and therefore inaccuratemeasured absorption loss. The absorption signature peak below noisefloor 701 can be restored, however, by curve fitting, as described inreference to FIG. 8.

FIG. 8 is a plot of a simulated absorption signature where the peak ofthe signature is restored using curve fitting, according to anembodiment. Since the absorption signature is unique for a giventransmission medium, a curve fitting technique (e.g., Sum of Sines) isused to estimate the peak below receiver noise floor 802, as shown inFIG. 8. Any suitable curve fitting technique can be used to restore thepeak of the absorption loss signature. In the example shown, knownabsorption signature data 804 for a gas is used with measured absorptionsignature data 801 in the Sum of Sines curve fitting algorithm to fitcurve 803 to known absorption signature data 804 below noise floor 802.

FIG. 9 is a block diagram illustrating transmitted and received signalsfor spectroscopy and imaging with multiple polarization, according to anembodiment. Polarization is a property that applies to transverse wavesthat specifies geometrical orientation of the oscillations. For example,in a transverse wave, the direction of the oscillation is perpendicularto the direction of motion of the wave. For a given polarization, if theangle of incidence is large it can result in significant signal loss.The angle of incidence is the angle between a ray incident on a surfaceand a line perpendicular to the surface at the point of incidence.

A solution to improve signal quality is to use one or more antennadiversity techniques, including but not limited to: spatial diversitythat uses multiple antennas with the same characteristics that arephysically separated from one another, pattern diversity that uses twoor more co-located directional antennas with different radiationpatterns, transmit/receive diversity that uses two separate, co-locatedantennas for transmit and receive functions, adaptive arrays (e.g., asingle antenna with active elements or an array of similar antennas withthe ability to change their combined radiation pattern) and polarizationdiversity that combines pairs of antennas with orthogonal polarizations(e.g., horizontal/vertical, +/−slant 45°, Left-hand/Right-hand circularpolarizations, etc.).

In the example THz spectroscopy and imaging system 900 shown in FIG. 9,polarization diversity is used to improve the SNR of the receivedsignal. Signal processor 901 commands baseband transmitters 902 a, 902 bto emit multiple transmitted signals 903 a, 903 b with differentpolarizations (e.g., vertical and horizontal polarization) to ensurebaseband receivers 906 a, 906 b receive received signals 905 a, 905 bwith different polarizations regardless of the angle of incidence ofimpingement on object 904. Note that the SNR of received signals 905 a,905 b is improved by combining received signals 905 a, 905 b with thedifferent polarizations in baseband receivers 906 a, 906 b. Note thatthe polarized THz signals can be emitted and received in parallel withtwo transmitters and two receivers or emitted and received by a singletransmitter and receiver by time multiplexing the polarized THz signals.

FIG. 10 is an Advanced Design System (ADS) schematic diagram of a singletransceiver antenna circuit model 1000 for simulation of in-planetransmission/reception of transmitted and received signals,respectively, according to an embodiment. The component SNP2 shown incircuit model 1000 is a two-port antenna component that imports atouchstone file, and the two 50 Ohm resistors are used for tuning theSNP2 component. As shown, a first port (port 3) of the transceiver emitsa THz wave which impinges reflection target 1001 at an angle ofincidence 1002, resulting in a reflection signal leaving the impingedsurface at a reflection angle 1002. The reflected signal is received ata second port (port 4) of the transceiver. Circuit 1000 suffers fromimpaired SNR due to the angle of incidence 1002.

FIG. 11 is an ADS schematic diagram of a dual receiver antenna and powercombining circuit model 1100 for simulating transmission/reception oftransmitted and received signals using multiple polarizations, accordingto an embodiment. Circuit model 1100 includes two-port antenna componentSNP1, amplifier components AWL AMP2, phase shifter components PS2, PS3and power combiner PWR1. The two 50 Ohm resistors are used for tuningthe SNP2 component. As shown, a first port (port 1) of the transceiveremits a THz wave which impinges reflection target 1001 at an angle ofincidence 1002, resulting in a reflection signal leaving the impingedsurface at a reflection angle 1002. The reflected signal is received ata second port (port 2) of the transceiver. Circuit 1100 providesmultiple polarizations to improve SNR.

The two circuit models 1000, 1100 described above were simulated usingHigh Frequency Structure Simulator (HFSS) developed by ANSYS® Inc. withreflection angles 1002 a of 45° and −45° and a sweep frequency of 1 THz.FIG. 12 shows the simulation results for the 45° reflection angle. Ascan be observed from FIG. 12, dual receiver antenna circuit model 1100with cross polarization achieves gains in power transfer of ˜3 dB oversingle receiver antenna circuit model 1000 with no cross polarization.

FIG. 13 is a block diagram illustrating an increase in path length of areceived signal (for imaging or spectroscopy use cases), according to anembodiment. Path length is the total distance travelled by the THzsignal in free-space before it arrives at baseband receiver 1305. For agiven transmission medium, absorption frequency path length determinesthe absorption loss. The longer the path length, the more absorptionloss that is incurred. In a dynamic environment, path length changes dueto multiple reflections off object surfaces at different angles ofincidence.

In a first example scenario, signal processor 1301 commands basebandtransmitter 1302 to emit a transmitted THz signal, which is reflectedoff first object 1303 in the dynamic environment and travels a firstpath length L to baseband receiver 1305. In a second scenario, thetransmitted signal is reflected off first object 1303, travels a secondpath length L, reflects off second object 1304 and travels a third pathlength L to baseband receiver 1305 for a total path length of 2L. Notethat in this example each path length is L. In a practical system, therecan be any number of reflective objects and path lengths and the pathlengths can be the same or different.

FIG. 14 is a plot of a spectral response of the received THz signal dueto the change in the path length shown in FIG. 13, according to anembodiment. As can be observed in FIG. 14, in the first scenario thereceived signal absorption loss is −x dBm for a path length L in signalstrength and in the second scenario the received signal absorption lossis −2x dBm for a path length of 2L, or twice the absorption path loss.Based on the two scenarios, the concentration level in parts per million(PPM) of the transmission medium differs due to the different pathlengths. To address the change in concentration level as a function ofpath length, concentration level is estimated using an empiricallygenerated reference library, as described in reference to FIGS. 15 and16.

FIG. 15 is a block diagram illustrating a calibration setup 1500 for thecreation of a reference library for mapping measured absorption loss andpath length to gas concentration level, according to an embodiment. Theexample calibration setup 1500 includes sealed, vacuum chamber 1502 withgas inlet 1506 for allowing various concentrations of a particulartarget gas 1507 into chamber 1502. Mirror surface 1508 located a knowndistance D from baseband receiver 1505 is used to reflect THz EM wavestransmitted by baseband transmitter 1504 to baseband receiver 1505. Thedistance D can be adjusted to determine concentration levels as afunction of absorption loss and path length. Using calibration setup1500 for different gases, different gas concentration levels fordifferent path lengths can be determined and organized into a referencelibrary as shown in FIG. 16.

FIG. 16 is an example table 1600 of the reference library, according toan embodiment. Given the measure path length and measured absorptionloss, the target gas concentration can be obtained from table 1600. Forexample, for each path length D various absorption losses (incrementedby 5%) with corresponding target gas concentrations are included intable 1600. Path length can be measured using TOA calculations, wherethe TOA equals to the difference between the start time of receipt ofthe received signal by the baseband receiver and the start time of thetransmitted signal multiplied by the speed of light. To determineconcentration level, the measured absorption path loss and the measuredabsorption loss are used to index table 1600 to obtain the estimatedconcentration level for the gas. Interpolation can be used to estimateconcentration levels for path lengths or measured absorption losses thatare in between the data points in table 1600. In an embodiment, table1600 is stored in memory on the electronic device, as described inreference to FIG. 17.

FIG. 17 is a schematic diagram of an architecture 1704 for performingTHz spectroscopy and imaging in a dynamic environment, according to anembodiment. Architecture 1704 is shown implemented on printed circuitboard 1703 installed in electronic device 1701, which in this example isa smartphone. Architecture 1704 includes application processor (AP)1705, Always on Processor (AOP) 1706, air/food quality detector 1711 andpower management unit (PMU) 1707. Air/food quality detector 1711 furtherincludes microcontroller/signal processor 1710, memory 1714, THz sensor1709 and analog-to-digital (A/D) converter 1713. Air/food qualitydetector 1711 is coupled to crystal oscillator 1712 and power source1702 (e.g., battery 1702) and can be implemented as a SoC on electronicdevice 1701.

In an embodiment, AOP 1706 is coupled to microcontroller/signalprocessor 1710 using general purpose I/O (GPIO) pins. AOP 1706 is“always on” while consumer electronic device 1701 is operating. Thisallows for continuous sensing of, for example, gas concentrations indynamic environments. In an application, a user carries electronicdevice 1701 on their person and if they enter an indoor environment thathas an unhealthy concentration of a harmful gas (e.g., CO₂, CO), theuser is automatically alerted through visual and/or audio feedback ofthe air/food quality on a display screen of mobile device 1701 and/oraudible alarm played through audio subsystem of electronic device 1701and/or force feedback through a haptic engine of electronic device 1701,as described in reference to FIG. 20.

In an embodiment, AOP 1706 is coupled to PMU 1707 and provides a HOSTWAKE signal to PMU 1707. In response to receiving the HOST WAKE signal,PMU 1707 provides a SENSOR EN signal to microcontroller/signal processor1710 to enable air/food quality detector 1709. PMU 1707 also provides aclock signal to microcontroller/signal processor 1710.

In an embodiment, AP 1705 communicates with microcontroller/signalprocessor 1710 through a serial communication interface, such as UART,SPI or I2C. AP 1705 also provides a DEV_WAKE signal to wake-upmicrocontroller/signal processor 1710 and a FW_DNLD_REQ tomicrocontroller/signal processor 1710 to update firmware in memory 1714for the sensor 1709. In an embodiment, memory 1714 stores targetmaterial spectral responses and the reference library described inreference to FIG. 1-16. Memory 1714 can be non-volatile memory such asflash memory.

In an embodiment, THz sensor 1709 is commanded by microcontroller/signalprocessor 1710 to emit EM waves in the THz frequency band into thedynamic environment, and receive THz EM waves reflected from one or moreobjects in the dynamic environment, as described in reference to FIGS.1-16. The received signals are converted from analog to digital valuesby A/D converter 1713 and input to microcontroller/signal processor1710. Microcontroller/signal processor 1710 computes the spectralresponse of the received signal using a frequency transformation. Anexample frequency transformation is the Fast Fourier Transform (FFT) butother methods can also be used such as linear predictive coding (LPC).Microcontroller/signal processor 1710 performs the compensationtechniques described in reference to FIGS. 1-8 to remove impairmentsfrom the spectral response of the received signal due to environment andsystem loses. Microcontroller/signal processor 1710 then implements amatching algorithm on the absorption signature of the received signaland known target absorption signatures stored in memory 1714.

In an embodiment, the matching is done by comparing absorptions spectrain the frequency domain. For example, the reference library in memory1714 records carbon monoxide (CO) as having an absorption spectra atfrequency 0.692 THz. When the THz EM wave is transmitted, the systemwill determine from the absorption spectra of the reflected signal ifthe frequency of 0.692 THz has any absorption. A match occurs whenabsorption spectra is detected at 0.692 THz.

In an alternative embodiment, the matching of absorption signatures isaccomplished by computing a Euclidean distance, or other suitabledistance metric, between the measured absorption signature and each ofthe known absorption signatures stored in memory 1714. In an embodiment,the target transmission medium having an absorption signature that isthe minimum Euclidean distance from the measured absorption signature isthe best match. After a matching is found, Microcontroller/signalprocessor 1710 accesses a reference library of concentration levelsstored in memory 1714 to estimate the concentration level of the matchedtransmission medium. Microcontroller/signal processor 1710 then reportsthe detected transmission medium and its estimated concentration levelto AOP 1706. The reported information is used by an application runningon AP 1705 to generate an alert on mobile device 1701 or perform anyother desired task using the reported information. The alert can be inany desired format using any desired output device, including but notlimited to: display screens, instant messaging, email, audio feedbackand force feedback.

In an application, the electronic device can report the information to acentralized server that crowd sources similar information from manydevices for a particular geographic area. For example, data can beharvested from multiple mobile devices operating at a disaster site(e.g., a building fire) through one or more wireless access points nearthe disaster site and the data can be combined and analyzed to determinethe risk of exposure of first responders to dangerous gases/chemicalspresent at the disaster site.

In another application, architecture 1704 can be integrated into a smartspeaker or other Internet of things (IoT) device. The device respond touser voice commands, such as “What is the carbon dioxide level in thisroom?” In an embodiment, the device can be integrated with a WiFinetwork so that multiple devices can be placed in differentrooms/offices and report local gas concentration levels. In anembodiment, the device can detect smoke and/or dangerous gases/chemicalscaused by a fire such as carbon monoxide (CO) or hydrogen cyanide (HC),and generate an alert and/or automatically call for emergencyassistance.

Example Processes

FIG. 18 is a flow diagram of THz spectroscopy process 1800 in a dynamicenvironment, according to an embodiment. Process 1800 can be implementedby architectures 1700, 2000, as described in reference to FIGS. 17 and20.

Process 1800 begins by emitting, by a transmitter of an electronicdevice, a continuous THz EM wave into a dynamic environment (1801),receiving, by a receiver of the consumer electronic device, a THz EMwave reflected from at least one object in the dynamic environment(1802), and computing, by one or more processors of the consumerelectronic device, a spectral response of a received signal indicativeof the reflective THz EM wave to determine an absorption spectra (1803),where the absorption spectra is indicative of a transmission medium inthe dynamic environment that changes over time. Details of process 1800is discussed in reference to FIGS. 1-16. An example hardwarearchitecture for performing these steps was previously disclosed inreference to FIG. 17.

Process 1800 continues by identifying the transmission medium in thedynamic environment by matching the absorption spectra of the receivedsignal with a known absorption spectra of a target transmission medium(1804). In an embodiment, to simplify comparisons between different gasspecies that differ in number of absorption peaks, a number of equalsized frequency bins of a histogram are constructed in the frequencyrange of 0.3 to 18.0 THz, with the frequency resolution based on themeasurement data. This technique is described in H. Lin et al., “Gasrecognition with terahertz time-domain spectroscopy and spectralcatalog: a preliminary study,” Terahertz Photonics (Nov. 29, 2007). Anencoding technique is used where an absorption peak at a particularfrequency marks the respective frequency bin with a Boolean one,otherwise the default value is a Boolean zero indicating no peak. Oncethe THz spectrum is encoded, the transmission medium in the dynamicenvironment is identified using a minimum Euclidean distance to targettransmission mediums stored on the device. More particularly, theEuclidean distance between each respective frequency bin in thehistogram is computed, combined and compared.

Process 1800 continues by determining, by the one or more processors, aconcentration level of the identified target transmission medium (1805).For example, the gas concentration level can be determined by comparingthe measured absorption loss and computed path length of the receivedsignal with a reference library of gas concentration levels for theidentified target transmission medium. A calibration setup can be usedto empirically determine gas concentration levels for the referencelibrary, as described in reference to FIGS. 15 and 16.

FIGS. 19A and 19B is a flow diagram of a first process 1900 of removingimpairments from a spectral response of a received signal due toenvironmental and system losses. Process 1900 can be implemented byarchitectures 1700 and 2000, as described in reference to FIGS. 17 and20, respectively.

Referring to FIG. 19A, process 1900 begins by obtaining the spectralresponse of a received signal (1901) and determining if a portion of theabsorption spectra is below a noise floor of the baseband receiver(1902). In accordance with the absorption spectra being below the noisefloor, using curve fitting to restore the portion of the absorptionspectra below the noise floor (1903).

Referring to FIGS. 19A and 19B, in accordance with a portion of theabsorption spectra not being below the noise floor or after restoringthe portion below the noise floor using curve fitting, obtaining a knownspectral response of a reference transmission medium (1904), andcompensating the spectral response of the received signal by subtractingthe delta between the spectral response of the received signal and theknown spectral response of the reference transmission medium (1905).

Process 1900 continues by determining a reference frequency with minimalloss across the THz frequency spectrum and extrapolating the signalstrength at that frequency across the THz frequency spectrum (1906),determining a fixed loss by subtracting the extrapolated fixed signalstrength from the transmit signal strength (1907), and compensating thespectral response of the received signal by subtracting the fixed lossfrom the spectral response of the received signal (1908).

Process 1900 continues by determining additional frequency-specific lossby subtracting signal strengths of other peaks of the spectral responseof the received signal at other frequencies from the fixed loss (1909),and compensating the spectral response of the received signal for theadditional frequency-specific loss by subtracting the additionalfrequency-specific loss from the spectral response of the receivedsignal (1910).

Embodiments for Optimizing System Performance

In an embodiment, it is desirable to optimize the performance of the THzsystem described in reference to FIGS. 1-19. If the THz system isincluded in a modern consumer electronic device (e.g., smartphone) thereis typically multiple onboard sensors that can be used to assist inoptimizing THz system performance. For example, motion sensors (e.g.,accelerometers, gyros) can be used to adjust the duty cycle of THz wavescanning to improve battery performance, and ambient sensors (e.g.,pressure sensor, temperature sensor, humidity sensor) to reduce theimpact of environmental factors (e.g., change in humidity or atmosphericpressure) on detection accuracy. Localization techniques (e.g.,cellular, satellite-based, WiFi) are used to account for county orcountry regulations/standards. An example of localization technology isa global positioning system (GPS) receiver chip that providesgeopositioning.

FIGS. 20A and 20B are example plots illustrating battery consumptionversus duty cycle for an electronic device that performs THz scans,according to an embodiment. FIG. 2A illustrates power consumption overtime with THz scanning at a 100% duty cycle (i.e., always scanning), andFIG. 21B illustrates the increase in battery consumption with anincrease in duty cycle percentage. As illustrated in FIGS. 20A and 20B,improvement to battery performance can be accomplished by reducing theduty cycle for THz scanning, as described in reference to FIGS. 21-28.

FIG. 20C is an example plot illustrating the impact of environmentalfactors on a gas signature, according to an embodiment.Humidity/moisture signature 2001 overlaps with gas signature 2000 andcan change due to atmospheric conditions (see dashed line).Additionally, atmospheric pressure can cause the frequency band of gassignature 2000 to widen 2000. Accordingly, atmosphere conditions canimpact the detection accuracy of the THz system. In an embodiment,additional processing of the reflected THz EM waves is performed toreduce the impact of atmospheric conditions on the detection accuracy ofthe THz system, as described below, as described in reference to FIGS.29 and 30.

FIGS. 21A and 21B illustrate the use of motions sensors of an electronicdevice to improve battery performance when the device is stationary andface up and when the device is stationary and face down, according to anembodiment. Referring to FIG. 21A, consumer electronic device 2102 isstationary (e.g., placed on a surface) and facing up towards ceiling2105. In this orientation (θ=90°), a first THz transceiver 2104 a ofelectronic device 2102 emits a THz EM wave that reflects off ceiling2105. The reflected THz EM wave travels through transmission medium 2103(e.g., chemical molecules in atmosphere) and is received by THztransceiver 2104 a. Because there is a zero angle of incidence withceiling 2105 the reflected THz EM wave suffers less signal loss due tothe impact with ceiling 2105. Also, assuming there are no reflectiveobjects between THz transceiver 2104 a and ceiling 2105, there is nosignal loss due to additional path delays caused by additionalreflections off other reflective objects.

Referring to FIG. 21B, electronic device 2102 is stationary and facingdown toward floor 2106. In this orientation (θ=90°), a second THztransceiver 2104 b of consumer electronic device 2102 emits a THz wavethat reflects off floor 2106. The reflected THz wave travels throughtransmission medium 2103 and is received by THz transceiver 2104 b.Because there is a zero angle of incidence with floor 2106 the reflectedTHz wave suffers less signal loss due to the impact with floor 2106.Also, assuming there are no reflective objects between THz transceiver2104 b and floor 2106, there is no signal loss due to additional pathdelays caused by additional reflections off other objects.

In an embodiment, one or more motion sensors (e.g., accelerometer, gyro,laser, infrared sensor, optical sensor) can detect when consumerelectronic device 2102 is stationary and pointing towards ceiling 2105or floor 2106 as illustrated in FIGS. 21A, 21B, and then reduce the dutycycle of the THz scan. For example, during a THz scan cycle THztransceiver 2104 sweeps out an angular arc between two limits (e.g., 0°to 180°). A multi-axis accelerometer of the electronic device 2102 candetermine a gravity vector and/or a multi-axis gyroscope can determinethe orientation of the electronic device 2102 in local-level referencecoordinate frame. If electronic device 2102 remains stationary for aspecified period of time (e.g., 30 seconds), the duty cycle of the THzscan is reduced to conserve battery power, as described more fully inreference to FIGS. 22A and 22B.

FIGS. 22A and 22B illustrate adjusting a THz scan duty cycle to savepower, according to an embodiment. FIG. 22A shows a THz system thatincludes signal processor 2200 THz transmitter 2203, THz receiver 2204and duty cycle power control unit 2201. THz baseband signals 2202 aretransmitted by THz transmitter 2203 and are reflected off object 2205.The reflected THz signals are received by THz receiver 2204 andprocessed by signal processor 2200, as previously described in FIG. 1A.Duty cycle power control unit 2201 adjusts the duty cycle of the THzscan if the electronic device is not connected to a non-battery powersource (e.g., a wall outlet). In an embodiment, power control unit 2201tests for the following example conditions:

-   -   If the electronic device is static for t<X second; scan at 100%        duty cycle,    -   If the electronic device is static for t>X seconds: scan at 50%        duty cycle,    -   If the electronic device is static for t>X+Y seconds: scan at        25% duty cycle.

If the electronic device is connected to a non-battery power source, theTHz scan is operated at 100% duty cycle or a selective tonetransmission, such as described in reference to FIG. 30. The duty cyclesreferenced above are only exemplary and any desired percentage reductionof duty cycle can be used and any desired values for the variables X andY can be used.

FIGS. 23A and 23B illustrate transmission power loss as a function ofincident angle using adaptive beam scanning to save power, according toan embodiment. As illustrated in FIG. 23A, path loss increases as theincident angle at the reflection point at the object increases,resulting in power loss in the reflected signal. The sharper theincident angle the greater the loss, as shown in FIG. 23B.

FIGS. 24A and 24B illustrate sweeping a THz wave to build a reflectivesignal strength table, according to an embodiment. For the THz system toaccurately detect a gas concentration, THz transceiver 2401 ofelectronic device 2400 emits a THz wave that is swept through a range ofscan angles to build a table of reflective signal strengths. For eachsweep angle ϕ_(i) the strength of the reflective signal (e.g., in dB)received by THz transceiver 2401 and its corresponding sweep angle arerecorded in data structure 2403 (e.g., a table) stored in memory of theelectronic device. In the example shown, there is a reflective signal atϕ3 due to object 2402. No other reflected signals were detected duringthis example THz scan. Any desired resolution for recording the sweepangle can be used, such as recording every x degrees of sweep (e.g., 5degrees).

After data structure 2403 is built, the contents of data structure 2403are used to direct THz transceiver 2401 to emit a THz wave only at thescan angle(s) recorded in the data structure 2403. Accordingly, theelectronic device scans the environment in which it is located todetermine scan angles where reflected THz signals are detected. By onlyscanning at recorded scan angles, battery power is conserved.

FIG. 25 is a flow diagram illustrating an adaptive beam scan process2500 to determine an optimum sweep angle to improve battery performance,according to an embodiment.

Process 2500 begins by starting THz sensor operation (2501) andtransmitting a sweeping THz wave through a plurality of scan angles(2502) referred to hereinafter as a “full scan.” In an embodiment, thesensor operation is started automatically or manually by a user throughan application running on the electronic device. The sensor operationcan be started automatically based on a schedule and/or trigger event.The extent of the sweep is determined by the number and placement of THztransmitters on the electronic device. For example, if two transmittersare facing opposite directions on the electronic device, thenpotentially a 360° sweep around the electronic device can be performed.

Process 2500 continues by detecting received signal strengths at eachscan angle and recording 2503 the signal strength and angle in a datastructure. In an embodiment, the data structure is a look-up table (LUT)where each row is a scan angle.

Process 2500 continues by finding the highest received signal strengthentry in the data structure at a specified scan angle (2504).Hereinafter, the specified angle is referred to as the “optimum angle.”For example, the table can be sorted based on received signal strength,such that the optimum angle is at the top of the LUT. The electronicdevice then transmits a THz EM wave for spectroscopy only at the optimumangle to conserve battery power.

Process 2500 continues by determining if the electronic device has moved(2505). For example, one or more motion sensors (e.g., an accelerometer)can be used to determine of the electronic device has moved. If theelectronic device has not moved, process 2500 returns to step 2504 andthe same optimum angle found in step 2504 is used to transmit the THz EMwave for spectroscopy.

If the electronic device has moved, process 2500 checks if the highestreceived signal strength is less than the received signal strength foundat the previous optimum angle X (2506). If the highest received signalstrength is less than a received signal strength at the previous optimumangle X, process 2500 returns to step 2502 to perform another full scanand determine a new optimum angle based on the results of the full scan.

Accordingly, a full scan of received signal strengths for all angles isperformed a first time to fill the data structure during aninitialization phase. After the initialization phase, a full scan isonly performed when the electronic device is detected by an onboardmotion sensor as moving, and the highest received signal strength isless than the received signal strength at the previous optimum angle.

FIGS. 26A and 26B illustrate adaptive transmit power output control toimprove battery performance, according to an embodiment. In anembodiment, a THz system includes signal processor 2600, THz transmitter2603, THz receiver 2605 and antenna element control module 2601. Signalprocessor 2600 generates a baseband signal 2602 that is transmitted byTHz transmitter 2603 into the environment, where it is reflected byobject 2604. The reflected THz wave is received by THz receiver 2605 andprocessed by signal processor 2600, as previously described. In anembodiment, antenna control element is configured to reduce the numberof antenna elements in THz transmitter 2603 to reduce batteryconsumption. For example, if the electronic device is static for t<Xseconds, all the antenna elements are used and the transmission of theTHz wave is at full power. If the electronic device is static for t>Xseconds, and the SNR is greater than a threshold value, the transmitpower is reduced by reducing the number of antenna elements used totransmit the THz EM wave.

Referring to FIG. 26B, an example embodiment of an antenna circuit foradaptive transmit output power is shown. The antenna circuit includesreceiver/transmitter device (RTD) 2606, switches 2607 a . . . 2607 n andantenna elements 2608 a . . . 2608 n. Antenna element control 2601 sendscontrol signals to switches 2607 a . . . 2607 n to open or close to addor remove antenna elements 2608 a . . . 2608 n from the path of RTD2606, respectively. The more antenna elements used in the transmissionof the THz EM wave, the more transmit signal power available and themore battery power consumed, as illustrated by the plot in FIG. 27.Conversely, removing antenna elements 2608 a . . . 2608 n from the pathof RTD 2606, reduces battery power consumption but at the expense ofless transmit signal power.

In embodiment, the THz system can operate in a “sniff mode” where THz EMwaves are transmitted at discrete known frequencies of defined targetgases that have a unique and maximum absorption spectra to improvebattery performance, according to an embodiment. As previously stated,THz transceivers typically sweep across the whole THz band offrequencies to detect the presence of a target gas. However, sweepingthe entire THz frequency band (0.3 THz to 18 THz) for every scanpenalizes battery performance. To improve battery performance, a “sniff”mode is used by the THz system to transmit known discrete frequencies towhich defined target gases have unique and maximum absorption spectra.In an embodiment, the THz system uses bias-controlled varactor 3007 forfrequency tuning, as described in reference to FIG. 28B. In anembodiment, the discrete frequencies of known target gases are assessedfrom a table or other data structure stored on the electronic device.

Referring to FIG. 28A, signal processor 2801 stores a frequency selecteddetective look-up table 2806 that includes a voltage bias (V_(bias)) foreach target gas. For example, each row of the table 2806 is associatedwith a target gas and includes a column for absorption frequency and acolumn for V_(bias) (volts). Table 2806 can be updated using OTAtechnology by an online service. In an embodiment, table 2806 is updatedbased on the location of the electronic device. In an embodiment, table2806 can be updated with known target gas data by a local area networkor beacon when the electronic device is operating at the location orfirst enters the location. In the example shown, SO2 gas is associatedwith V_(bias) X1, CO gas is associated with V_(bias) X2 and NO2 gas isassociated with V_(bias) X3, as shown in table 2806. Signal processor2801 retrieves the V_(bias) values and sends them to THz transmitter2802, which includes bias-controlled varactor circuit 3007 shown in FIG.28B. The V_(bias) values cause circuit 2807 to resonate at discretefrequencies X, Y and Z, for SO2, CO, NO2, respectively, as shown in thefrequency plot 2805. Also shown are overlapping tones K, which thesystem intends to avoid. The result is that THz system transmits THz EMwaves at discrete known frequencies for target gases, the reflections ofthose THz EM waves are received by THz receiver 2803 and signalprocessor 2801 computes the spectral responses of reflected signals aspreviously described.

Accordingly, the “sniff” mode, allows the THz system to: 1) preventoverlapping tones of different gases to improve detection accuracy; 2)save battery power, as the transmitter transmits only at the selectedfrequencies in table 2801; 3) reduce sweep time as it does not requireto scan a large frequency band, which is critical in dynamicenvironments as the THz sensor is not stationary for extended period oftime; and 4) use bias controlled varactor to allow coarse and finefrequency tuning which allows for improved gas signature detection.

FIG. 28B is schematic diagram of a bias-controlled varactor circuit 2807for transmitting discrete THz EM waves, according to an embodiment. RTD2808 is coupled to coil 2809 and variable capacitor 2810. The absorptionfrequencies X, Y and Z shown in FIG. 28A can be obtained by adjustingthe variable capacitor 2810 to different values, resulting in adifferent resonant frequency for each gas. Variable capacitor 2810 canbe changed by, for example, microcontroller/signal processor 1710described in reference to FIG. 17.

FIGS. 29A and 29B illustrate using ambient sensors to enable correctionfor impact from environmental factors, according to an embodiment. In anembodiment, onboard sensors (e.g., pressure, temperature and humiditysensors) are used to enable correction for impact from environmentalfactors. For example, a pressure sensor reading can be used to correctfor the signal spread for target gas signatures, a humidity sensor canbe used to remove spectral contributions from humidity/moisture in thespectral response of the reflected THz signal and temperature sensorreading can be used to compensate for SNR loss due to thermal losses.

Referring to FIG. 29A, the broadening of the frequency band of a gassignal due to atmospheric pressure is illustrated. An increase inatmospheric pressure results in a SNR degradation and widening ofspectral degradation. Similarly, the effect of temperature and humidityon the spectral response of the received signal is illustrated. Thespectral response is shifted vertically resulting in an SNR loss, asshown in FIG. 29B.

In an embodiment, a table of SNR loss for various readings of pressure,humidity and temperature. During operation, pressure, temperature andhumidity readings from onboard sensor readings are used to index thetable to obtain corrections that are applied to the spectral response ofthe received THz signal reflected from the environment, and thus reducethe impact of environmental factors on detection accuracy.

FIG. 30 is a flow diagram illustrating a process 3000 of usinglocation-based information to optimize THz sensing, according to anembodiment.

Process 3000 begins by starting THz sensor operation (3001) anddetermining whether the electronic device is indoors or outdoors (3002).For example, one or more of satellite signal strength data, map data,radio frequency beacons and the presence or absence of WiFi signals isused to automatically determine if the electronic device is operatingindoors or outdoors. In an embodiment, manual user input (touch orspeech input) is used to inform the THz system that the electronicdevice is indoors.

In accordance with the electronic device operating indoors, loadingindoor gas reference data and last known calibration and gasconcentration limits associated with county or country specificregulations or standards (3003). In accordance with the electronicdevice operating outdoors, outdoor gas reference data and last knowncalibration and gas concentration limits are obtained by the THz system(3004). The reference gas data can be for a known gas (e.g., 02, N) atthe location, as described in reference to FIGS. 5A-5C. The last knowncalibration data can be recorded by the electronic device at thelocation and stored in a table or other data structure on the electronicdevice. In an embodiment, the gas concentration limits are preloadedduring manufacture and updated over-the-air (OTA) by an online updateservice for the electronic device.

Process 3000 continues by obtaining onboard ambient/motion sensorreadings (3005) and compensating the spectral response of the receivedTHz signal using the ambient/motion sensor readings (3005). For example,the amplitude or frequency band of the spectral response can be adjustedto compensate for the changes to the spectral response in amplitude andfrequency band due to environmental factors.

Exemplary Device Architecture

FIG. 31 illustrates example electronic device architecture 3100implementing the features and operations described in reference to FIGS.1-30. Architecture 3100 can include memory interface 3102, one or moredata processors, image processors and/or processors 3104 and peripheralsinterface 3106. Memory interface 3102, one or more processors 3104and/or peripherals interface 3106 can be separate components or can beintegrated in one or more integrated circuits.

Sensors, devices and subsystems can be coupled to peripherals interface3106 to provide multiple functionalities. For example, one or moremotion sensors 3110, light sensor 3112 and proximity sensor 3114 can becoupled to peripherals interface 3106 to facilitate motion sensing(e.g., acceleration, rotation rates), lighting and proximity functionsof the wearable computer. Location processor 3115 can be connected toperipherals interface 3106 to provide geopositioning. In someimplementations, location processor 3115 can be a GNSS receiver, such asthe Global Positioning System (GPS) receiver. Electronic magnetometer3116 (e.g., an integrated circuit chip) can also be connected toperipherals interface 3106 to provide data that can be used to determinethe direction of magnetic North. Electronic magnetometer 3116 canprovide data to an electronic compass application. Motion sensor(s) 3110can include one or more accelerometers and/or gyros configured todetermine change of speed and direction of movement of the wearablecomputer. Barometer 3117 can be configured to measure atmosphericpressure around the mobile device. Air/food quality detector 3120 (seeFIG. 17) can be configured to perform the THz spectroscopy and imagingdescribed in reference to FIGS. 1-30.

In an embodiment, a digital image capture device and a depth sensor(both not shown) can be coupled to peripherals interface 3106. Thedigital image capture device (e.g., a video camera) captures images(e.g., digital photos, video clips) and depth sensor (e.g., infrared,LIDAR) capture depth data (e.g., point cloud data) for renderingthree-dimensional scenes for augmented reality (AR) and virtual reality(VR) applications.

Communication functions can be facilitated through wirelesscommunication subsystems 3124, which can include radio frequency (RF)receivers and transmitters (or transceivers) and/or optical (e.g.,infrared) receivers and transmitters. The specific design andimplementation of the communication subsystem 3124 can depend on thecommunication network(s) over which a mobile device is intended tooperate. For example, architecture 3100 can include communicationsubsystems 3124 designed to operate over a GSM network, 3G, 4G, 5G, aGPRS network, an EDGE network, a WiFi™ network, near field (NF) and aBluetooth™ network. In particular, the wireless communication subsystems3124 can include hosting protocols, such that the mobile device can beconfigured as a base station for other wireless devices.

Audio subsystem 3126 can be coupled to a speaker 3128 and a microphone3130 to facilitate voice-enabled functions, such as voice recognition,voice replication, digital recording and telephony functions. Audiosubsystem 3126 can be configured to receive voice commands from theuser.

I/O subsystem 3140 can include touch surface controller 3142 and/orother input controller(s) 3144. Touch surface controller 3142 can becoupled to a touch surface 3146. Touch surface 3146 and touch surfacecontroller 3142 can, for example, detect touch contact and movement(gestures) or break thereof using any of a plurality of touchsensitivity technologies, including but not limited to capacitive,resistive, infrared and surface acoustic wave technologies, as well asother proximity sensor arrays or other elements for determining one ormore points of contact with touch surface 3146. Touch surface 3146 caninclude, for example, a touch screen or the digital crown of a smartwatch. I/O subsystem 3140 can include a haptic engine or device forproviding haptic feedback (e.g., vibration) in response to commands fromprocessor 3104. In an embodiment, touch surface 3146 can be apressure-sensitive surface.

Other input controller(s) 3144 can be coupled to other input/controldevices 3148, such as one or more buttons, rocker switches,thumb-wheels, infrared ports, Thunderbolt® ports and USB ports. The oneor more buttons (not shown) can include an up/down button for volumecontrol of speaker 3128 and/or microphone 3130. Touch surface 3146 orother controllers 3144 (e.g., a button) can include, or be coupled to,fingerprint identification circuitry for use with a fingerprintauthentication application to authenticate a user based on theirfingerprint(s).

In one implementation, a pressing of the button for a first duration maydisengage a lock of the touch surface 3146; and a pressing of the buttonfor a second duration that is longer than the first duration may turnpower to the mobile device on or off. The user may be able to customizea functionality of one or more of the buttons. The touch surface 3146can, for example, also be used to implement virtual or soft buttons.

In some implementations, the mobile device can present recorded audioand/or video files, such as MP3, AAC and MPEG files. In someimplementations, the mobile device can include the functionality of anMP3 player. Other input/output and control devices can also be used.

Memory interface 3102 can be coupled to memory 3150. Memory 3150 caninclude high-speed random access memory and/or non-volatile memory, suchas one or more magnetic disk storage devices, one or more opticalstorage devices and/or flash memory (e.g., NAND, NOR). Memory 3150 canstore operating system 3152, such as the iOS operating system developedby Apple Inc. of Cupertino, Calif. Operating system 3152 may includeinstructions for handling basic system services and for performinghardware dependent tasks. In some implementations, operating system 3152can include a kernel (e.g., UNIX kernel).

Memory 3150 may also store communication instructions 3154 to facilitatecommunicating with one or more additional devices, one or more computersand/or one or more servers, such as, for example, instructions forimplementing a software stack for wired or wireless communications withother devices. Memory 3150 may include graphical user interfaceinstructions 3156 to facilitate graphic user interface processing;sensor processing instructions 3158 to facilitate sensor-relatedprocessing and functions; phone instructions 3160 to facilitatephone-related processes and functions; electronic messaging instructions3162 to facilitate electronic-messaging related processes and functions;web browsing instructions 3164 to facilitate web browsing-relatedprocesses and functions; media processing instructions 3166 tofacilitate media processing-related processes and functions;GNSS/Location instructions 3168 to facilitate generic GNSS andlocation-related processes and instructions; and THz spectroscopy andimaging instructions 3170 to facilitate THz spectroscopy and imaging, asdescribed in reference to FIGS. 1-30.

Each of the above identified instructions and applications cancorrespond to a set of instructions for performing one or more functionsdescribed above. These instructions can be implemented as separatesoftware programs, procedures, or modules or as a single body of code.Memory 3150 can include additional instructions or fewer instructions.Various functions of the mobile device may be implemented in hardwareand/or in software, including in one or more signal processing and/orapplication specific integrated circuits.

The described features can be implemented advantageously in one or morecomputer programs that are executable on a programmable system includingat least one programmable processor coupled to receive data andinstructions from, and to transmit data and instructions to, a datastorage system, at least one input device, and at least one outputdevice. A computer program is a set of instructions that can be used,directly or indirectly, in a computer to perform a certain activity orbring about a certain result. A computer program can be written in anyform of programming language (e.g., SWIFT, Objective-C, C #, Java),including compiled or interpreted languages, and it can be deployed inany form, including as a stand-alone program or as a module, component,subroutine, a browser-based web application, or other unit suitable foruse in a computing environment.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinventions or of what may be claimed, but rather as descriptions offeatures specific to particular embodiments of particular inventions.Certain features that are described in this specification in the contextof separate embodiments can also be implemented in combination in asingle embodiment. Conversely, various features that are described inthe context of a single embodiment can also be implemented in multipleembodiments separately or in any suitable sub combination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to a subcombination or variation of a sub combination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems cangenerally be integrated together in a single software product orpackaged into multiple software products.

As described above, one aspect of the present technology is thegathering and use of data available from various sources to improve thedelivery to users of invitational content or any other content that maybe of interest to them. The present disclosure contemplates that in someinstances, this gathered data may include personal information data thatuniquely identifies or can be used to contact or locate a specificperson. Such personal information data can include demographic data,location-based data, telephone numbers, email addresses, home addresses,or any other identifying information.

The present disclosure recognizes that the use of such personalinformation data, in the present technology, can be used to the benefitof users. For example, the personal information data can be used todeliver targeted content that is of greater interest to the user.Accordingly, use of such personal information data enables calculatedcontrol of the delivered content. Further, other uses for personalinformation data that benefit the user are also contemplated by thepresent disclosure.

The present disclosure further contemplates that the entitiesresponsible for the collection, analysis, disclosure, transfer, storage,or other use of such personal information data will comply withwell-established privacy policies and/or privacy practices. Inparticular, such entities should implement and consistently use privacypolicies and practices that are generally recognized as meeting orexceeding industry or governmental requirements for maintaining personalinformation data private and secure. For example, personal informationfrom users should be collected for legitimate and reasonable uses of theentity and not shared or sold outside of those legitimate uses. Further,such collection should occur only after receiving the informed consentof the users. Additionally, such entities would take any needed stepsfor safeguarding and securing access to such personal information dataand ensuring that others with access to the personal information dataadhere to their privacy policies and procedures. Further, such entitiescan subject themselves to evaluation by third parties to certify theiradherence to widely accepted privacy policies and practices.

Despite the foregoing, the present disclosure also contemplatesembodiments in which users selectively block the use of, or access to,personal information data. That is, the present disclosure contemplatesthat hardware and/or software elements can be provided to prevent orblock access to such personal information data. For example, in the caseof advertisement delivery services, the present technology can beconfigured to allow users to select to “opt in” or “opt out” ofparticipation in the collection of personal information data duringregistration for services. In another example, users can select not toprovide location information for targeted content delivery services. Inyet another example, users can select to not provide precise locationinformation, but permit the transfer of location zone information.

Therefore, although the present disclosure broadly covers use ofpersonal information data to implement one or more various disclosedembodiments, the present disclosure also contemplates that the variousembodiments can also be implemented without the need for accessing suchpersonal information data. That is, the various embodiments of thepresent technology are not rendered inoperable due to the lack of all ora portion of such personal information data. For example, content can beselected and delivered to users by inferring preferences based onnon-personal information data or a bare minimum amount of personalinformation, such as the content being requested by the deviceassociated with a user, other non-personal information available to thecontent delivery services, or publically available information.

What is claimed is:
 1. A method comprising: emitting, by a transmitterof an electronic device, a continuous electromagnetic (EM) wave in aterahertz (THz) frequency band, the EM wave being emitted into a dynamicenvironment that includes a transmission medium that changes over time;receiving, by a receiver of the electronic device, a reflected EM wavereflected off at least one object in the environment; determining, byone or more processors of the electronic device, a spectral response ofa received signal indicative of the reflected EM wave, the spectralresponse including absorption spectra at a frequency in the THzfrequency band that is indicative of the transmission medium in theenvironment; compensating, by the one or more processors, the spectralresponse of the received signal for fixed and frequency-specific losses;comparing, by the one or more processors, the compensated absorptionspectra with known absorption spectra of target transmission mediums;identifying, by the one or more processors and based on results of thecomparing, a particular target transmission medium as being thetransmission medium in the environment; determining, by the one or moreprocessors, an absorption loss from the compensated absorption spectrain the spectral response of the received signal; and using theabsorption loss to obtain a concentration level of the targettransmission medium in the environment.
 2. The method of claim 1,wherein the concentration level of the target transmission medium isobtained from a reference library of known concentration levels.
 3. Themethod of claim 1, wherein compensating the spectral response of thereceived signal for frequency-specific loss, further comprises:determining a reference spectral response of a reference transmissionmedium in the environment; and compensating the spectral response of thereceived signal for the frequency-specific loss using the referencespectral response.
 4. The method of claim 1, wherein compensating thespectral response of the received signal for fixed loss, furthercomprises: determining a reference frequency at which absorption loss isminimal across the THz frequency band; extrapolating a signal strengthat the reference frequency across the THz frequency band; determining afixed path loss by computing a delta between the extrapolated signalstrength and a signal strength of the EM wave; and subtracting the deltafrom the spectral response of the receive signal.
 5. The method of claim1, further comprising: determining, by the one or more processors, thata portion of the absorption spectra is below a noise floor of thereceiver; and using curve fitting to restore the portion of theabsorption spectra below the noise floor.
 6. The method of claim 1,wherein the transmitted EM wave has multiple polarizations.
 7. A systemcomprising: a transmitter configured to emit a continuouselectromagnetic (EM) wave in a terahertz (THz) frequency band into adynamic environment, the dynamic environment including a transmissionmedium that changes over time; a receiver configured to receive areflected EM wave from at least one object in the environment; one ormore processors; memory storing instructions that when executed by theone or more processors, cause the one or more processors to performoperations comprising: determining a spectral response of a receivedsignal indicative of the reflected EM wave, the spectral responseincluding absorption spectra at a frequency in the THz frequency bandthat is indicative of the transmission medium in the environment;compensating the spectral response of the received signal for fixed andfrequency-specific losses; comparing the absorption spectra with knownabsorption spectra of target transmission mediums; identifying aparticular target transmission medium as being the transmission mediumin the environment based on results of the comparing; determining anabsorption loss from the absorption spectra in the spectral response ofthe received signal; and using the absorption loss to obtain aconcentration level of the target transmission medium in theenvironment.
 8. The system of claim 7, wherein the concentration levelof the target transmission medium is obtained from a reference libraryof known concentration levels.
 9. The system of claim 7, whereincompensating the spectral response of the received signal forfrequency-specific loss, further comprises: determining a referencespectral response of a reference transmission medium in the environment;and compensating the spectral response of the received signal for thefrequency-specific loss using the reference spectral response.
 10. Thesystem of claim 7, wherein compensating the spectral response of thereceived signal for fixed loss, further comprises: determining areference frequency at which absorption loss is minimal across the THzfrequency band; extrapolating a signal strength at the referencefrequency across the THz frequency band; determining a fixed path lossby computing a delta between the extrapolated signal strength and asignal strength of the EM wave; and subtracting the delta from thespectral response of the receive signal.
 11. The system of claim 7,further comprising: determining, by the one or more processors, that aportion of the absorption spectra is below a noise floor of thereceiver; and using curve fitting to restore the portion of theabsorption spectra below the noise floor.
 12. The system of claim 7,wherein the transmitted EM wave has multiple polarizations.
 13. Anon-transitory, computer-readable storage medium having stored thereoninstructions that when executed by one or more processors, cause the oneor more processors to perform operations, comprising: emitting acontinuous electromagnetic (EM) wave in a terahertz (THz) frequencyband, the EM wave being emitted into a dynamic environment that includesa transmission medium that changes over time; receiving a reflected EMwave reflected off at least one object in the environment; determining aspectral response of a received signal indicative of the reflected EMwave, the spectral response including absorption spectra at a frequencyin the THz frequency band that is indicative of the transmission mediumin the environment; compensating the spectral response of the receivedsignal for fixed and frequency-specific losses; comparing the absorptionspectra with known absorption spectra of target transmission mediums;identifying, based on results of the comparing, a particular targettransmission medium as being the transmission medium in the environment;determining an absorption loss from the absorption spectra in thespectral response of the received signal; and using the absorption lossto obtain the concentration level of the target transmission medium inthe environment.
 14. The system of claim 13, wherein the concentrationlevel of the target transmission medium is obtained from a referencelibrary of known concentration levels.
 15. The non-transitory,computer-readable storage medium of claim 13, wherein compensating thespectral response of the received signal for frequency-specific loss,further comprises: determining a reference spectral response of areference transmission medium in the environment; and compensating thespectral response of the received signal for the frequency-specific lossusing the reference spectral response.
 16. The non-transitory,computer-readable storage medium of claim 13, wherein compensating thespectral response of the received signal for fixed loss, furthercomprises: determining a reference frequency at which absorption loss isminimal across the THz frequency band; extrapolating a signal strengthat the reference frequency across the THz frequency band; determining afixed path loss by computing a delta between the extrapolated signalstrength and a signal strength of the EM wave; and subtracting the deltafrom the spectral response of the receive signal.
 17. Thenon-transitory, computer-readable storage medium of claim 13, furthercomprising: determining, by the one or more processors, that a portionof the absorption spectra is below a noise floor of the receiver; andusing curve fitting to restore the portion of the absorption spectrabelow the noise floor.
 18. The non-transitory, computer-readable storagemedium of claim 13, wherein the transmitted EM wave has multiplepolarizations.